for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
/**
* cbpAnimatedHeader.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* Copyright 2013, Codrops
*/
var cbpAnimatedHeader = (function() {
var docElem = document.documentElement,
header = document.querySelector( '.navbar-default' ),
didScroll = false,
changeHeaderOn = 300;
function init() {
window.addEventListener( 'scroll', function( event ) {
event
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.
if( !didScroll ) {
didScroll = true;
setTimeout( scrollPage, 250 );
}
}, false );
function scrollPage() {
var sy = scrollY();
if ( sy >= changeHeaderOn ) {
classie.add( header, 'navbar-shrink' );
classie
/** global: classie */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
else {
classie.remove( header, 'navbar-shrink' );
didScroll = false;
function scrollY() {
return window.pageYOffset || docElem.scrollTop;
init();
})();
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.